package com.hmall.user.config;

import com.hmall.user.interceptors.AuthorizationHandlerInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * Mvc配置类
 *
 * @Author Eeyore
 * @Date 2022/8/12 18:06
 * @Description: Mvc配置类
 */
@Configuration
public class MvcConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
       registry.addInterceptor(new AuthorizationHandlerInterceptor())
               .addPathPatterns("/order/**");
    }
}